﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VK.Comm.Tables
{
    public static class TableHelper
    {
        public static string GetCheckBoxHtml(int tableID)
        {
            StringBuilder html = new StringBuilder();
            TableColumnEntity[] columnlst = TableBLL.GetTableColumnList(tableID);
            foreach (TableColumnEntity column in columnlst)
            {
                html.Append(string.Format("<input type='checkbox' value='{0}' name='chkFields' id='chkFields{0}' {2} /><label for='chkFields{0}'>{1}</label>&nbsp;", column.Name, column.Label, column.IsEnable ? "Checked" : string.Empty));
            }
            return html.ToString();
        }
    }
}
